3.1.2 \(\int x^2 (d+e x) (a+b \log (c x^n)) \, dx\) [2]

Optimal. Leaf size=48 \[ -\frac {1}{9} b d n x^3-\frac {1}{16} b e n x^4+\frac {1}{12} \left (4 d x^3+3 e x^4\right ) \left (a+b \log \left (c x^n\right )\right ) \]

[Out]

-1/9*b*d*n*x^3-1/16*b*e*n*x^4+1/12*(3*e*x^4+4*d*x^3)*(a+b*ln(c*x^n))

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {45, 2371, 12} \begin {gather*} \frac {1}{12} \left (4 d x^3+3 e x^4\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{9} b d n x^3-\frac {1}{16} b e n x^4 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2*(d + e*x)*(a + b*Log[c*x^n]),x]

[Out]

-1/9*(b*d*n*x^3) - (b*e*n*x^4)/16 + ((4*d*x^3 + 3*e*x^4)*(a + b*Log[c*x^n]))/12

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2371

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IGtQ[m, 0]

Rubi steps

\begin {align*} \int x^2 (d+e x) \left (a+b \log \left (c x^n\right )\right ) \, dx &=\frac {1}{12} \left (4 d x^3+3 e x^4\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \frac {1}{12} x^2 (4 d+3 e x) \, dx\\ &=\frac {1}{12} \left (4 d x^3+3 e x^4\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{12} (b n) \int x^2 (4 d+3 e x) \, dx\\ &=\frac {1}{12} \left (4 d x^3+3 e x^4\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{12} (b n) \int \left (4 d x^2+3 e x^3\right ) \, dx\\ &=-\frac {1}{9} b d n x^3-\frac {1}{16} b e n x^4+\frac {1}{12} \left (4 d x^3+3 e x^4\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 45, normalized size = 0.94 \begin {gather*} \frac {1}{144} x^3 \left (48 a d-16 b d n+36 a e x-9 b e n x+12 b (4 d+3 e x) \log \left (c x^n\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2*(d + e*x)*(a + b*Log[c*x^n]),x]

[Out]

(x^3*(48*a*d - 16*b*d*n + 36*a*e*x - 9*b*e*n*x + 12*b*(4*d + 3*e*x)*Log[c*x^n]))/144

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.04, size = 264, normalized size = 5.50

method result size
risch \(\frac {b \,x^{3} \left (3 e x +4 d \right ) \ln \left (x^{n}\right )}{12}-\frac {i \pi b e \,x^{4} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{8}+\frac {i \pi b e \,x^{4} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{8}+\frac {i \pi b e \,x^{4} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{8}-\frac {i \pi b e \,x^{4} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{8}+\frac {\ln \left (c \right ) b e \,x^{4}}{4}-\frac {b e n \,x^{4}}{16}+\frac {x^{4} a e}{4}-\frac {i \pi b d \,x^{3} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{6}+\frac {i \pi b d \,x^{3} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{6}+\frac {i \pi b d \,x^{3} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{6}-\frac {i \pi b d \,x^{3} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{6}+\frac {\ln \left (c \right ) b d \,x^{3}}{3}-\frac {b d n \,x^{3}}{9}+\frac {x^{3} a d}{3}\) \(264\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(e*x+d)*(a+b*ln(c*x^n)),x,method=_RETURNVERBOSE)

[Out]

1/12*b*x^3*(3*e*x+4*d)*ln(x^n)-1/8*I*Pi*b*e*x^4*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+1/8*I*Pi*b*e*x^4*csgn(I*c)
*csgn(I*c*x^n)^2+1/8*I*Pi*b*e*x^4*csgn(I*x^n)*csgn(I*c*x^n)^2-1/8*I*Pi*b*e*x^4*csgn(I*c*x^n)^3+1/4*ln(c)*b*e*x
^4-1/16*b*e*n*x^4+1/4*x^4*a*e-1/6*I*Pi*b*d*x^3*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+1/6*I*Pi*b*d*x^3*csgn(I*c)*
csgn(I*c*x^n)^2+1/6*I*Pi*b*d*x^3*csgn(I*x^n)*csgn(I*c*x^n)^2-1/6*I*Pi*b*d*x^3*csgn(I*c*x^n)^3+1/3*ln(c)*b*d*x^
3-1/9*b*d*n*x^3+1/3*x^3*a*d

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 60, normalized size = 1.25 \begin {gather*} -\frac {1}{16} \, b n x^{4} e + \frac {1}{4} \, b x^{4} e \log \left (c x^{n}\right ) - \frac {1}{9} \, b d n x^{3} + \frac {1}{4} \, a x^{4} e + \frac {1}{3} \, b d x^{3} \log \left (c x^{n}\right ) + \frac {1}{3} \, a d x^{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

-1/16*b*n*x^4*e + 1/4*b*x^4*e*log(c*x^n) - 1/9*b*d*n*x^3 + 1/4*a*x^4*e + 1/3*b*d*x^3*log(c*x^n) + 1/3*a*d*x^3

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 71, normalized size = 1.48 \begin {gather*} -\frac {1}{16} \, {\left (b n - 4 \, a\right )} x^{4} e - \frac {1}{9} \, {\left (b d n - 3 \, a d\right )} x^{3} + \frac {1}{12} \, {\left (3 \, b x^{4} e + 4 \, b d x^{3}\right )} \log \left (c\right ) + \frac {1}{12} \, {\left (3 \, b n x^{4} e + 4 \, b d n x^{3}\right )} \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

-1/16*(b*n - 4*a)*x^4*e - 1/9*(b*d*n - 3*a*d)*x^3 + 1/12*(3*b*x^4*e + 4*b*d*x^3)*log(c) + 1/12*(3*b*n*x^4*e +
4*b*d*n*x^3)*log(x)

________________________________________________________________________________________

Sympy [A]
time = 0.27, size = 66, normalized size = 1.38 \begin {gather*} \frac {a d x^{3}}{3} + \frac {a e x^{4}}{4} - \frac {b d n x^{3}}{9} + \frac {b d x^{3} \log {\left (c x^{n} \right )}}{3} - \frac {b e n x^{4}}{16} + \frac {b e x^{4} \log {\left (c x^{n} \right )}}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(e*x+d)*(a+b*ln(c*x**n)),x)

[Out]

a*d*x**3/3 + a*e*x**4/4 - b*d*n*x**3/9 + b*d*x**3*log(c*x**n)/3 - b*e*n*x**4/16 + b*e*x**4*log(c*x**n)/4

________________________________________________________________________________________

Giac [A]
time = 2.60, size = 73, normalized size = 1.52 \begin {gather*} \frac {1}{4} \, b n x^{4} e \log \left (x\right ) - \frac {1}{16} \, b n x^{4} e + \frac {1}{4} \, b x^{4} e \log \left (c\right ) + \frac {1}{3} \, b d n x^{3} \log \left (x\right ) - \frac {1}{9} \, b d n x^{3} + \frac {1}{4} \, a x^{4} e + \frac {1}{3} \, b d x^{3} \log \left (c\right ) + \frac {1}{3} \, a d x^{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

1/4*b*n*x^4*e*log(x) - 1/16*b*n*x^4*e + 1/4*b*x^4*e*log(c) + 1/3*b*d*n*x^3*log(x) - 1/9*b*d*n*x^3 + 1/4*a*x^4*
e + 1/3*b*d*x^3*log(c) + 1/3*a*d*x^3

________________________________________________________________________________________

Mupad [B]
time = 3.59, size = 51, normalized size = 1.06 \begin {gather*} \ln \left (c\,x^n\right )\,\left (\frac {b\,e\,x^4}{4}+\frac {b\,d\,x^3}{3}\right )+\frac {d\,x^3\,\left (3\,a-b\,n\right )}{9}+\frac {e\,x^4\,\left (4\,a-b\,n\right )}{16} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a + b*log(c*x^n))*(d + e*x),x)

[Out]

log(c*x^n)*((b*d*x^3)/3 + (b*e*x^4)/4) + (d*x^3*(3*a - b*n))/9 + (e*x^4*(4*a - b*n))/16

________________________________________________________________________________________